import win32com.client


process_name = 'excel.exe'

WMI = win32com.client.GetObject('winmgmts:')
processCodeCov = WMI.ExecQuery('select * from Win32_Process where Name="{}"'.format(process_name))
if len(processCodeCov) > 0:
    print('{} is exists'.format(process_name))
    excel = win32com.client.GetActiveObject("excel.application")
    print(excel)
else:
    print('{} is not exists'.format(process_name))
